package a.oschina.eventbusdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SeconActivity extends AppCompatActivity {

    @BindView(R.id.bt_clock2)
    Button mBtClock2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
        ButterKnife.bind(this);
    }


    @OnClick({R.id.bt_clock2})
    public void onClick(View view) {
        switch (view.getId() ){
            case R.id.bt_clock2:
                EventBus.getDefault().post(new MessageEvent("欢迎大家浏览我写的博客"));
                finish();
                break;

        }

    }


}
